package com.whz.http.advice;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 全局异常处理器
 *
 * @author whz
 */
@Configuration
public class GlobalExceptionConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public GlobalExceptionHandler createGlobalExceptionHandler() {
        return new GlobalExceptionHandler();
    }
}